<div class="row">
    <div class="col-md-2">
        <h2><kbd><?php echo __('Actions'); ?></kbd></h2><hr/>
        <ul class="nav nav-stacked ">
            <li><?php echo $this->Html->link(__('New Wallet'), array('action' => 'add')); ?></li>
            <li><?php echo $this->Html->link(__('List Users'), array('controller' => 'users', 'action' => 'index')); ?> </li>
            <li><?php echo $this->Html->link(__('New User'), array('controller' => 'users', 'action' => 'add')); ?> </li>
            <li><?php echo $this->Html->link(__('List Transactions'), array('controller' => 'transactions', 'action' => 'index')); ?> </li>
            <li><?php echo $this->Html->link(__('New Transaction'), array('controller' => 'transactions', 'action' => 'add')); ?> </li>
            <li><?php echo $this->Html->link(__('Set Default Wallet'), array('controller' => 'wallets', 'action' => 'setdefault')); ?> </li>
            <li><?php echo $this->Html->link(__('Change Money Wallet'), array('controller' => 'wallets', 'action' => 'changemoney')); ?> </li>
        </ul>
    </div> 
    <div class="wallets col-md-10">
        <h2><kbd><?php echo __('Wallets'); ?></h2></kbd><hr/>
        <table class="table table-bordered">
            <tr class="warning">
                <th><?php echo $this->Paginator->sort('id'); ?></th>
                <th><?php echo $this->Paginator->sort('user_id'); ?></th>
                <th><?php echo $this->Paginator->sort('name'); ?></th>
                <th><?php echo $this->Paginator->sort('current_money'); ?></th>
                <th><?php echo $this->Paginator->sort('created'); ?></th>
                <th><?php echo $this->Paginator->sort('updated'); ?></th>
                <th class="actions"><?php echo __('Actions'); ?></th>
            </tr>
            <?php foreach ($wallets as $wallet): ?>
                <tr>
                    <td><?php echo h($wallet['Wallet']['id']); ?>&nbsp;</td>
                    <td>
                        <?php echo $this->Html->link($wallet['User']['username'], array('controller' => 'users', 'action' => 'view', $wallet['User']['id'])); ?>
                    </td>
                    <td><?php echo h($wallet['Wallet']['name']); ?>&nbsp;</td>
                    <td><?php echo number_format($wallet['Wallet']['current_money']) . " VNĐ"; ?>&nbsp;</td>
                    <td><?php echo h($wallet['Wallet']['created']); ?>&nbsp;</td>
                    <td><?php echo h($wallet['Wallet']['updated']); ?>&nbsp;</td>
                    <td class="actions">
                        <?php echo $this->Html->link(__('View'), array('action' => 'view', $wallet['Wallet']['id']), array('class' => 'btn-sm btn-info')); ?>
                        <?php if ($currentUser['id'] == $wallet['Wallet']['user_id']): ?>
                            <?php echo $this->Html->link(__('Edit'), array('action' => 'edit', $wallet['Wallet']['id']), array('class' => 'btn-sm btn-warning')); ?>
                            <?php echo $this->Form->postLink(__('Delete'), array('action' => 'delete', $wallet['Wallet']['id']), array('class' => 'btn-sm btn-danger'), __('Are you sure you want to delete # %s?', $wallet['Wallet']['id'])); ?>
                        <?php endif; ?>
                    </td>
                </tr>
            <?php endforeach; ?>
        </table>
        <p>
            <?php
            echo $this->Paginator->counter(array(
                'format' => __('Page {:page} of {:pages}, showing {:current} records out of {:count} total, starting on record {:start}, ending on {:end}')
            ));
            ?>	</p>
        <ul class="pagination">
            <?php
            echo '<li>' . $this->Paginator->prev('< ' . __('previous'), array(), null, array('class' => 'prev disabled')) . '</li>';
            echo '<li>' . $this->Paginator->numbers(array('separator' => '')) . '</li>';
            echo '<li>' . $this->Paginator->next(__('next') . ' >', array(), null, array('class' => 'next disabled')) . '</li>';
            ?>
        </ul>
    </div>

</div>